<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-sizes="pageSizes"
    :page-size="pageSizeInfo"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  >
  </el-pagination>
</template>

<script>
export default {
  props: {
    // 当前页数
    currentPage: {
      type: [Number, String],
      default: 1
    },
    // 个数显示器
    pageSizes: {
      type: Array,
      default: () => [10, 20, 50]
    },
    pageSizeInfo: {
      type: [Number, String],
      default: 10
    },
    total: {
      type: [Number, String],
      default: 0
    }
  },
  methods: {
    handleSizeChange (val) {
      this.$emit('handleSizeChange', val)
    },
    handleCurrentChange (val) {
      this.$emit('handleCurrentChange', val)
    }
  },
}
</script>

<style>
</style>